app.service('brandService',function ($http) {
    //查询所有的列表
    this.findList = function () {
        return $http.get('../brand/list.do');
    }

    //分页查询所有的列表
    this.findPage = function (page, size) {
        return $http.get('../brand/findPage.do?page=' + page + '&size=' + size);
    }

    //条件查询所有的列表
    this.search=function (page, size, searchEntity) {
        return $http.post('../brand/search.do?page=' + page + '&size=' + size, searchEntity);
    }

    //增加
    this.add = function (entity) {
        return $http.post('../brand/add.do', entity);
    }

    //更新
    this.update = function (entity) {
        return $http.post('../brand/update.do', entity);
    }

    //通过条件查询实体类
    this.findOne = function (id) {
        return $http.get('../brand/findOne.do?id=' + id);
    }

    this.dele = function (selectIds) {
        return $http.get('../brand/delete.do?ids=' + selectIds);
    }

    this.selectOptionList = function () {
        $http.get('../brand/selectOptionList.do');
    }
});